export default [
  {
    props: 'elderlyId',
    labelKey: 'idNumber',
    fixed: 'left',
    minWidth: 180
  },
  {
    props: 'elderlyName',
    labelKey: 'name',
    minWidth: 100
  },
  {
    props: 'gender',
    labelKey: 'gender',
    minWidth: 80
  },
  {
    props: 'residence',
    labelKey: 'residence',
    minWidth: 150
  },
  {
    props: 'selfCare',
    labelKey: 'selfCareAbility',
    minWidth: 120,
    // 高阶函数形式，接收t函数作为参数
    formatter: (t) => (row, column, cellValue) => {
      if (cellValue === undefined || cellValue === null) return '';
      return cellValue ? t('yes') : t('no');
    }
  },
  {
    props: 'isLivingAlone',
    labelKey: 'livingAlone',
    minWidth: 120,
    // 高阶函数形式，接收t函数作为参数
    formatter: (t) => (row, column, cellValue) => {
      if (cellValue === undefined || cellValue === null) return '';
      return cellValue ? t('yes') : t('no');
    }
  },
  {
    props: 'familyContactNumber',
    labelKey: 'familyPhone',
    minWidth: 150
  },
  {
    props: 'disease',
    labelKey: 'disease',
    minWidth: 150
  },
  {
    props: 'helpRequestsCount',
    labelKey: 'taskQuantity',
    minWidth: 100
  }
];
